/** @format */

import { createApp } from 'vue';
import './utils/rem'; // 引入rem适配方案
import './assets/css/reset.css';
import './assets/css/flex.scss';
import './assets/css/common.scss';
import './assets/css/responsive.scss'; // 引入响应式样式
import './assets/css/mobile.scss'; // 引入移动端专用样式
import ElementPlus from 'element-plus';
import locale from 'element-plus/lib/locale/lang/zh-cn';
import '@/assets/font/fonts.css';
// import "element-plus/dist/index.css";
import 'element-plus/theme-chalk/index.css';
import './assets/css/custom.scss';
import * as ElementPlusIconsVue from '@element-plus/icons-vue';

// 自定义icon组件
import CompEmpty from '@/components/comp-empty/Index.vue';
import CompPagination from '@/components/comp-pagination/Index.vue';

import App from './App.vue';
import router from './router';
import store from './store';
import axios from './utils/request';
import pinia from './store/pinia.ts';

const app = createApp(App);
// 全局注册图标 elemet plus
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component);
}

app.config.globalProperties.$axios = axios;
// 全部加载
app.use(ElementPlus, { locale });
app.component('comp-empty', CompEmpty);
app.component('comp-pagination', CompPagination);

app.use(router).use(store).use(pinia).mount('#app');
